<template>
<div>
   <el-date-picker
        v-model="value"
        v-bind="elProps"
        @change="change"        
      />
</div>
</template>

<script setup>
import { ref,watch } from 'vue' 
const props = defineProps({
    elProps:Object,
    modelValue:[String,Array]
})
const value = ref('')
value.value = props.modelValue
watch(()=>props.modelValue,(newval)=>{
value.value = newval
})
const emit = defineEmits(['update:modelValue'])
const change = ()=>{
    emit('update:modelValue',value.value)
}

</script>

<style lang='scss' scoped>

</style>